<?php
class LogisticaHelper extends Helper{

   public function existe_logistica($taller) {
     App::import('Model', 'Logistica');
        $this->Logistica = new Logistica;
        $this->data = $this->Logistica->find('first', array('fields'=>'Logistica.id', 
        												   'conditions'=>array('Logistica.tallere_id'=>$taller)));
        return $this->data;
   }
   
   function getMy($what,$taller){

		App::import('Model', 'Logistica');
        $this->Logistica = new Logistica;
        $this->data = $this->Logistica->find('first', array('conditions'=>array('Logistica.tallere_id'=>$taller)));
		return !empty($this->data) && isset($this->data['Logistica'][$what]) ? $this->data['Logistica'][$what] : false;
	}	
}
?>
